import { Allow, IsNotEmpty, MaxLength } from 'class-validator'
import i18n, { i18nMessage } from '@/i18n'
import { ApiProperty } from '@nestjs/swagger'

export class MetaBoardDataSaveDto {
  @ApiProperty({ description: i18n.t('app-meta.dto.meta-board-data-save.12152193-0'), type: String })
  @IsNotEmpty()
  label: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-board-data-save.12152193-1'), type: String })
  @Allow()
  data: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-board-data-save.12152193-2'), type: String })
  @IsNotEmpty()
  @MaxLength(64, { message: i18nMessage() })
  platform: string

  @ApiProperty({ description: i18n.t('app-meta.dto.meta-board-data-save.12152193-3'), type: String })
  @Allow()
  project?: string
}
